import request from "../utils/request";

const good = {
  getParentClass(params) {
    return request.get("/goods/getParentClass", {params: params})
  },
  getHisGoods(params) {
    return request.get("/goods/getHisGoods", {params: params})
  },
  getGoodsOnSale(params) {
    return request.get("/goods/getGoodsOnSale", {params: params})
  },
  getChildClass(params) {
    return request.get("/goods/getChildClass", {params: params})
  },
  getByParentClass(params) {
    return request.get("/goods/getByParentClass", {params: params})
  },
  getByChildClass(params) {
    return request.get("/goods/getByChildClass", {params: params})
  },
  getGoodsClass() {
    return request.get("/goods/getGoodsClass");
  },
  updateClass(data) {
    return request.put("/goods/updateClass", data);
  },
  insertClass(data) {
    return request.post("/goods/insertClass", data);
  },
  deleteClass(params) {
    return request.delete("/goods/deleteClass", {params: params});
  }
}

export default good;
